#ifndef FRAME_H
#define FRAME_H

#include <QFrame>
#include <QLabel>
#include <QHBoxLayout>
#include "utils.h"

#include <boost/shared_ptr.hpp>
#include <boost/make_shared.hpp>

class Frame : public QFrame
{
    Q_OBJECT
public:
    explicit Frame(QWidget *parent = 0);

private:
    /* Net Speed */
    boost::shared_ptr<QLabel> m_net_send_speed;
    boost::shared_ptr<QLabel> m_net_recv_speed;

    /* Net Layout */
    boost::shared_ptr<QHBoxLayout> m_net_layout;

    /* Cache Data */
    unsigned long long old_send_data_len;
    unsigned long long old_recv_data_len;

protected:
    void mouseDoubleClickEvent(QMouseEvent *);

signals:
    void show_sysinfo_gui();

public:
    /* We Read Net Info too */
    utils::Speed_percent read_net();

    /* Update net GUI */
    void update_net_gui(utils::Speed_percent &speed_percent);
};

#endif // FRAME_H
